import React, { Component } from 'react';
import axios from 'axios'

import Header from '../informations/InformationsViews'
import Fan from './fansViews'

import A from 'assets/images/my/touxiang2@2x.png'

class Fans extends Component {
    state = { 
        title:'我的粉丝',
        list:[],
        defaultImg:A
     }
    async componentDidMount(){
        let uid =window.localStorage.getItem('uid')
        let a =await axios({url:'/Legang/black/list',method:'GET',data:{uid}})
        // console.log(a)
        this.setState({
            list:a.data.data
        })
     }
    render() { 
        return ( 
            <>
                <Header  back={()=>this.goBack()} title={this.state.title}></Header>
                <Fan list={this.state.list} defaultImg={this.state.defaultImg}></Fan>
            </>
         );
    }
    goBack(){
        this.props.history.go(-1)
    }
}
 
export default Fans;

